package com.sc.nft.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class UserDaoDetailVO {

    @ApiModelProperty("用户id")
    private Long id;

    @ApiModelProperty("注册时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date createTime;

    @ApiModelProperty("手机号")
    private String userTel;

    @ApiModelProperty("用户身份")
    private String levelName;

    @ApiModelProperty("首发交易")
    private BigDecimal holdToken;

    @ApiModelProperty("寄售交易")
    private BigDecimal secondaryHoldToken;

    @ApiModelProperty("头像")
    private String avatarImg;

    @ApiModelProperty("是否实名")
    private Boolean isSm;


    @ApiModelProperty("首发交易")
    private String holdTokenString;

    @ApiModelProperty("寄售交易")
    private String secondaryHoldTokenString;

    public void setHoldToken(BigDecimal holdToken) {
        this.holdToken = holdToken;
        this.holdTokenString = holdToken.setScale(2, BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setSecondaryHoldToken(BigDecimal secondaryHoldToken) {
        this.secondaryHoldToken = secondaryHoldToken;
        this.secondaryHoldTokenString = secondaryHoldToken.setScale(2, BigDecimal.ROUND_DOWN).toPlainString();
    }

}
